package org.hardstone.domain.media.resource;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;

import org.hardstone.domain.BaseItemDomain;
import org.hardstone.domain.BaseCategory;
import org.hardstone.domain.Status;

@Entity
@Table(name = "Video")
public class Video extends BaseItemDomain<Long> {

    @Column(name = "title")
    private String title;                   // 视频标题//

    @Column(name = "director")
    private String director;                // 导演

    @Column(name = "cast")
    private String cast;                    // 演员表

    @Column(name = "genre")
    private String genre;                   // 视频风格/类型

    @Column(name = "releaseYear")
    private Integer releaseYear;            // 发行年份

    @Column(name = "duration")
    private Long duration;                  // 持续时长（毫秒）

    @Column(name = "resolution")
    private String resolution;              // 分辨率（例如 1920x1080）

    @Column(name = "fileFormat")
    private String fileFormat;              // 文件格式（MP4, AVI, MKV等）

    @Column(name = "size")
    private Long size;                      // 文件大小（字节）

    @Column(name = "rating")
    private Float rating;                   // 用户评分

    @Column(name = "description", columnDefinition = "TEXT")
    private String description;             // 视频描述

    public Video() {
    }

    public Video(Long id, Long itemGroupId, String name, BaseCategory category, Long userId, Long userGroupId, int authority, String url, String videoDescription, Status status, String askDate, String modifyDate, String tags, String attribute, String title, String director, String cast, String genre, Integer releaseYear, Long duration, String resolution, String fileFormat, Long size, Float rating) {
        super(id, itemGroupId, name, category, userId, userGroupId, authority, url, videoDescription, status, askDate, modifyDate, tags, attribute);
        this.title = title;
        this.director = director;
        this.cast = cast;
        this.genre = genre;
        this.releaseYear = releaseYear;
        this.duration = duration;
        this.resolution = resolution;
        this.fileFormat = fileFormat;
        this.size = size;
        this.rating = rating;
        this.description = videoDescription;
    }

    // Getters and Setters for all fields
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getCast() {
        return cast;
    }

    public void setCast(String cast) {
        this.cast = cast;
    }

    public String getGenre() {
        return genre;
    }

    public void setGenre(String genre) {
        this.genre = genre;
    }

    public Integer getReleaseYear() {
        return releaseYear;
    }

    public void setReleaseYear(Integer releaseYear) {
        this.releaseYear = releaseYear;
    }

    public Long getDuration() {
        return duration;
    }

    public void setDuration(Long duration) {
        this.duration = duration;
    }

    public String getResolution() {
        return resolution;
    }

    public void setResolution(String resolution) {
        this.resolution = resolution;
    }

    public String getFileFormat() {
        return fileFormat;
    }

    public void setFileFormat(String fileFormat) {
        this.fileFormat = fileFormat;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public Float getRating() {
        return rating;
    }

    public void setRating(Float rating) {
        this.rating = rating;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
